//
//  Person.h
//  HomeWork 05 排序、数组字典的处理
//
//  Created by dllo on 16/7/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Person : NSObject
@property (nonatomic, retain) NSString *name;
@property (nonatomic, assign) NSInteger age;
@property (nonatomic, retain) NSString *gender;
- (instancetype)initWithName:(NSString *)name age:(NSInteger)age gender:(NSString *)gender;
+ (instancetype)personWithName:(NSString *)name age:(NSInteger)age gender:(NSString *)gender;

- (NSComparisonResult)asSortedByName:(Person *)another;
- (NSComparisonResult)asSortedByAge:(Person *)another;
- (NSComparisonResult)asSortedByGender:(Person *)another;
@end
